package com.yuan.Result;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result<T> {

    private Integer code;
    private String msg;
    private T data;

    public static<T>  Result<T> success() {
        Result<T> result = new Result<>();
        result.code = 1;
        result.msg = "success";
        return result;
    }
    public static<T>  Result<T> success(T da) {
        Result<T> result = new Result<>();
        result.code = 1;
        result.msg = "success";
        result.data = da;
        return result;
    }

}
